what's the difference between a method and a function